package org.self.autoconfig;

import org.self.properties.JwtTokenProperties;
import org.self.service.IJwtService;
import org.self.service.impl.JwtService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 作者: liYU
 * 项目名称: WX_Self_Iot_parent
 * 标题: JwtServiceAutoConfiguration
 * 该类描述: TODO
 * 创建日期: 2025/3/31 22:03
 */
@Configuration
@EnableConfigurationProperties(JwtTokenProperties.class)
public class JwtServiceAutoConfiguration {

    @Bean
    public IJwtService jwtService(JwtTokenProperties jtp) {
        JwtService jwtService = new JwtService();
        jwtService.setSign(jtp.getSign());
        return jwtService;
    }

}
